#include <algorithm>
#include <iostream>
using namespace std;
int a[5];
int main()
{
    cin >> a[0] >> a[1] >> a[2];
    sort(a, a + 3);
    cout << max(a[2], a[1] + a[0]) << " " << min(a[2], a[1] + a[0]) << endl;
    return 0;
}